import {
	JSEncrypt
} from 'wxmp-rsa'



const publicKey =
	`MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzKwze7hDn4PvbQL+tB1LjMgbSfUoMeJQ88fhWjaHv3Jz2DoAdi7N2eolfhtTVkoy3gWFJB3jrJSgxk8FonqtChJa1+gteUIPxoZaoMzM7FEubcr/1f8WkFFZZAfeGnZ4ItDToJlEUzWB+uuB91bVIyPrVix0boMNxFYhJbvtf0T8oJ921oYiwNSLj2Z4yeGNpFd5XyjYOfZcl0sIxOO4mE0stkM8mPYPNRBokWBJ2ojSTCj4dH7nq0ZBFCVDPehksAggAshEKGtHodDigpsYYF9RJX0ZEZkHL1nm6OGfjXbAN3e3QMGq41hIBDBq5jJK2CYC10kJffDuadl0JqnllQIDAQAB`


const myEncrypt = new JSEncrypt()
myEncrypt.setPublicKey(publicKey) // 加密


// const cryptStr = myEncrypt.encryptLong(str)
// console.log('加密后的结果：', cryptStr)


String.prototype.encryptLong = function() {
	return myEncrypt.encryptLong(this)
}

Number.prototype.encryptLong = function() {
	return myEncrypt.encryptLong(this)
}


/**
 * @description: base64位图片转码文件流
 * @param {type}
 * @Date: 2019-05-25 09:57:22
 */

